#region File Description
//-----------------------------------------------------------------------------
// SmokePlumeParticleSystem.cs
//
// Microsoft XNA Community Game Platform
// Copyright (C) Microsoft Corporation. All rights reserved.
//-----------------------------------------------------------------------------
#endregion

using System;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using AloneLibrary.Particlesystem;

namespace Alone.Particlesystem
{
    /// <summary>
    /// Custom particle system for creating a giant plume of long lasting smoke.
    /// </summary>
    class RocketBootsSmokeParticleSystem : ParticleSystem
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="RocketBootsSmokeParticleSystem"/> class.
        /// </summary>
        /// <param name="game"></param>
        /// <param name="content"></param>
        public RocketBootsSmokeParticleSystem(Game game, ContentManager content)
            : base(game, content)
        { }


        /// <summary>
        /// Derived particle system classes should override this method
        /// and use it to initalize their tweakable settings.
        /// </summary>
        /// <param name="settings"></param>
        protected override void InitializeSettings(ParticleSettings settings)
        {
            settings.TextureName = @"Textures\smoke";

            settings.MaxParticles = 600;

            settings.Duration = TimeSpan.FromSeconds(15);

            settings.MinHorizontalVelocity = 0;
            settings.MaxHorizontalVelocity = 0;

            settings.MinVerticalVelocity = -80;
            settings.MaxVerticalVelocity = -40;

            // Create a wind effect by tilting the gravity vector sideways.
            settings.Gravity = new Vector3(-20, -5, 0);

            settings.EndVelocity = 0.75f;

            settings.MinRotateSpeed = -1;
            settings.MaxRotateSpeed = 1;

            settings.MinStartSize = 40;
            settings.MaxStartSize = 80;

            settings.MinEndSize = 100;
            settings.MaxEndSize = 400;
        }
    }
}
